const os = require("os");
//获取本机ip
let getIPAdress = function () {
  var interfaces = os.networkInterfaces();
  for (var devName in interfaces) {
    var iface = interfaces[devName];
    for (var i = 0; i < iface.length; i++) {
      var alias = iface[i];
      if (
        alias.family === "IPv4" &&
        alias.address !== "127.0.0.1" &&
        !alias.internal
      ) {
        return alias.address;
      }
    }
  }
};
const IP = getIPAdress();

const EXTERNAL_IP = "127.0.0.1";

const PORT = 5000; // 后台服务启动的端口号

const USER_NAME = "root";
const PASS_WORD = "root";
const DATABASE_NAME = "sell";

module.exports = {
  IP,
  PORT,
  EXTERNAL_IP,
  USER_NAME,
  PASS_WORD,
  DATABASE_NAME,
};
